<?php
class Income_tg extends CI_Controller {
	public function __construct() {
		parent::__construct ();
		
		// 登录校验
		$this->common->check_login_mobile ();
		// 通过user_model的get_user_info_id方法获取个人信息
		$this->user_info = $this->user->get_user_info_id ( $_SESSION ['mobile'] ['id'] );
		
		$this->load->helper ( array (
				'form',
				'url',
				'system' 
		) );
		
		$this->load->model ( 'team_model' );
	}
	
	//
	public function income_tg($page = 1) {
		$perpage = 10;
		
		if ($page == 0) {
			$page = 1;
		}
		
		$data ['data_list'] = $this->team_model->team_list_all ( $page, $perpage, $this->user_info ['id'] );
		
		$data ['data_count'] = $this->team_model->team_list_all_count ( $this->user_info ['id'] );
		
		$data ['multi'] = multi ( $data ['data_count'], $perpage, $page, site_url ( 'mobile/income_tg/income_tg/?' ), '?' );
		
		$data ['left'] = $this->load->view ( 'mobile/left', '', TRUE );
		$data ['foot'] = $this->load->view ( 'mobile/foot', '', TRUE );
		$this->load->view ( 'mobile/income_tg', $data );
	}
}